package org.xbs.demo1.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.xbs.demo1.mapper.VideoMapper;
import org.xbs.demo1.pojo.Video;
import org.xbs.demo1.service.IVideoService;
import org.xbs.demo1.tools.FileTools;

import java.io.IOException;

@Service
public class VideoService implements IVideoService {
    @Autowired
    private VideoMapper videoMapper;
    @Override
    public void uploadVideo(Video video) throws IOException {
        videoMapper.uploadVideo(video);
        FileTools.saveVideo(video);

    }
}
